package com.gite.nouette.admin.implementation.integrator.assembler;

import com.gite.nouette.admin.contract.integrator.assembler.IAssemblerContainerModule;
import com.gite.nouette.admin.contract.integrator.director.IDirectorContainerModule;
import com.gite.nouette.admin.contract.model.IManager;

public abstract class AbstractAssemblerContainerModule implements
		IAssemblerContainerModule {

	private IManager parentProduct;
	private IDirectorContainerModule director;

	@Override
	public IManager getParentProduct() {
		return this.parentProduct;
	}

	@Override
	public void setParentProduct(IManager parentProduct) {
		this.parentProduct = parentProduct;
	}

	@Override
	public IDirectorContainerModule getDirector() {
		return this.director;
	}

	@Override
	public void setDirector(IDirectorContainerModule director) {
		this.director = director;
	}

	@Override
	public void run() {
		getDirector().constructProduct();
		getParentProduct().setContainerModule(getDirector().getProduct());
	}
}
